namespace Happy.Cms.Domain.EntityFramework.Migrations
{
    using System;
    using System.Data.Entity.Migrations;

    public partial class AlertArticle_201401150550008 : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.AssignedTags", "ArticleId", "dbo.Articles");
            DropIndex("dbo.AssignedTags", new[] { "ArticleId" });
            CreateIndex("dbo.AssignedTags", "ArticleId");
            AddForeignKey("dbo.AssignedTags", "ArticleId", "dbo.Articles", "Id", cascadeDelete: true);
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.AssignedTags", "ArticleId", "dbo.Articles");
            DropIndex("dbo.AssignedTags", new[] { "ArticleId" });
            CreateIndex("dbo.AssignedTags", "ArticleId");
            AddForeignKey("dbo.AssignedTags", "ArticleId", "dbo.Articles", "Id");
        }
    }
}
